import { onMounted, reactive } from 'vue'

export function handleReactive() {
  let demoObj = reactive({
    name: ''
  })
  demoObj.name = 'demo1'
  let testObj = reactive({
    name: ''
  })
  testObj.name = 'demo2'
  onMounted(() => {
    demoObj = { name: 'hello world' }
    console.log(demoObj)

    setTimeout(() => {
      testObj = { name: 'hello world' }
      console.log(testObj)
    }, 3000)
  })
  return {
    demoObj,
    testObj
  }
}
